<!DOCTYPE html>
    <html>
    <head>
        <meta charset="UTF-8">
        <title>Linux&#x7684;&#x57fa;&#x7840;&#x64cd;&#x4f5c;</title>
        <style>
/* From extension vscode.github */
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

.vscode-dark img[src$=\#gh-light-mode-only],
.vscode-light img[src$=\#gh-dark-mode-only] {
	display: none;
}

</style>
        
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/markdown.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/highlight.css">
<style>
            body {
                font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif;
                font-size: 14px;
                line-height: 1.6;
            }
        </style>
        <style>
.task-list-item {
    list-style-type: none;
}

.task-list-item-checkbox {
    margin-left: -20px;
    vertical-align: middle;
    pointer-events: none;
}
</style>
        
    </head>
    <body class="vscode-body vscode-light">
        <ul>
<li><a href="#linux%E7%9A%84%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C">Linux的基础操作</a>
<ul>
<li><a href="#cd--ls--ll-mkdir-rmkir">cd  ls  ll mkdir rmkir</a></li>
<li><a href="#cat--more-less">cat  more less</a></li>
<li><a href="#rm-cp-mv">rm cp mv</a></li>
<li><a href="#%E6%89%93%E5%8C%85%E6%88%96%E8%A7%A3%E5%8E%8B-tar">打包或解压 tar</a></li>
<li><a href="#%E6%9F%A5%E6%89%BE%E6%96%87%E4%BB%B6find%E5%92%8Cgrep%E4%BB%A5%E5%8F%8A%E6%9F%A5%E7%9C%8B%E4%B8%8B%E8%BD%BD%E8%BD%AF%E4%BB%B6rpm">查找文件find和grep以及查看下载软件rpm</a></li>
<li><a href="#pwd--touch--clear">pwd  touch  clear</a></li>
<li><a href="#%E9%87%8D%E5%AE%9A%E5%90%91--%E8%BF%9B%E8%A1%8C%E8%A6%86%E7%9B%96%E5%92%8C-%E8%BF%9B%E8%A1%8C%E8%BF%BD%E5%8A%A0">重定向  &gt;（进行覆盖）和 &gt;&gt;（进行追加）</a></li>
<li><a href="#%E5%85%B3%E9%97%AD%E8%BF%9B%E8%A1%8C-kill">关闭进行 kill</a></li>
<li><a href="#%E7%AE%A1%E9%81%93---%E7%BB%93%E5%90%88%E7%9D%80ps--ef">管道 |  结合着ps -ef</a></li>
<li><a href="#%E8%B5%84%E6%BA%90%E9%87%8D%E6%96%B0%E5%8A%A0%E8%BD%BD-source">资源重新加载 source</a></li>
</ul>
</li>
<li><a href="#linux%E7%9A%84%E6%9D%83%E9%99%90">Linux的权限</a>
<ul>
<li><a href="#%E6%9D%83%E9%99%90%E4%BF%AE%E6%94%B9-chmod-777-xxx">权限修改 chmod 777 xxx</a></li>
</ul>
</li>
<li><a href="#linux%E4%B8%8A%E5%B8%B8%E7%94%A8%E7%BD%91%E7%BB%9C%E6%93%8D%E4%BD%9C">Linux上常用网络操作</a>
<ul>
<li><a href="#1%E4%B8%BB%E6%9C%BA%E5%90%8D%E9%85%8D%E7%BD%AE-hostname">1、主机名配置 hostname</a></li>
<li><a href="#2ip%E5%9C%B0%E5%9D%80--ifconfig">2、ip地址  ifconfig</a></li>
<li><a href="#3%E5%9F%9F%E5%90%8D%E6%98%A0%E5%B0%84">3、域名映射</a></li>
<li><a href="#4%E7%BD%91%E7%BB%9C%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%AE%A1%E7%90%86">4、网络服务器管理</a></li>
</ul>
</li>
</ul>
<h1 id="linux的基础操作">Linux的基础操作</h1>
<p>​	常用命名：</p>
<p>1.getconf LONG_BIT:可以查看我们安装的虚拟机的版本</p>
<p>2.ifconfig：可以查看虚拟机的ip地址以及其它网关信息</p>
<p>​	我们有时需要把本机的文件传到虚拟机里面，这里就需要我们使用Xshell7连接虚拟机和Xftp7传输文件。</p>
<blockquote>
<p>Linux目录结构</p>
</blockquote>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261621881.png" alt="image-20220426162116731"></p>
<p><strong>其中在Linux中的  / 表示根目录</strong>。</p>
<hr>
<h2 id="cd--ls--ll-mkdir-rmkir">cd  ls  ll mkdir rmkir</h2>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261850504.png" alt="image-20220426185046458"></p>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261850623.png" alt="image-20220426185028496"></p>
<h2 id="cat--more-less">cat  more less</h2>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261854429.png" alt="image-20220426185433360"></p>
<h2 id="rm-cp-mv">rm cp mv</h2>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261858034.png" alt="image-20220426185759947"></p>
<h2 id="打包或解压-tar">打包或解压 tar</h2>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261900961.png" alt="image-20220426190045886"></p>
<p>进行打包：</p>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261914090.png" alt="image-20220426191441930"></p>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261919919.png" alt="image-20220426191925718"></p>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261921499.png" alt="image-20220426192112461"></p>
<p>进行解压：</p>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261923555.png" alt="image-20220426192316488"></p>
<h2 id="查找文件find和grep以及查看下载软件rpm">查找文件find和grep以及查看下载软件rpm</h2>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261905533.png" alt="image-20220426190504461"></p>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202205041327502.png" alt="image-20220504132759442"></p>
<p>这样可以看到我们已经下载好软件：要是我们想卸载软件可以使用 rpm -额--nodeps 软件名称：</p>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202205041333501.png" alt="image-20220504133303465"></p>
<h2 id="pwd--touch--clear">pwd  touch  clear</h2>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261929258.png" alt="image-20220426192937202"></p>
<blockquote>
<p>ctrl+l  也可以进行清屏</p>
</blockquote>
<h2 id="重定向--进行覆盖和-进行追加">重定向  &gt;（进行覆盖）和 &gt;&gt;（进行追加）</h2>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261936626.png" alt="image-20220426193624584"></p>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261939963.png" alt="image-20220426193903916"></p>
<h2 id="关闭进行-kill">关闭进行 kill</h2>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261940740.png" alt="image-20220426194021703"></p>
<h2 id="管道---结合着ps--ef">管道 |  结合着ps -ef</h2>
<p>ps -ef可以进行查看我们的系统中全部的进程</p>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261942818.png" alt="image-20220426194222721"></p>
<h2 id="资源重新加载-source">资源重新加载 source</h2>
<p>我们在进行修改一些配置后，它并不会立即起效，这样需要我们进行重新加载配置资源这样，修改后的配置会起效，这个命令常用在我们在进行安装软件时，并且还需要进行配置环境变量，经常用到：</p>
<p>例如：安装好JDK1.8；并在 /etc/profile 配置好环境变量后使用使用source /etc/profile</p>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202205041236428.png" alt="image-20220504123645386"></p>
<hr>
<h1 id="linux的权限">Linux的权限</h1>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261947996.png" alt="image-20220426194703950"></p>
<p>1           3         3        3   （对应着下图中的  -  ---  ---  ---）</p>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261948021.png" alt="image-20220426194829948"></p>
<p>234，他们都有读写执行的权限；</p>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261953640.png" alt="image-20220426195351566"></p>
<p>这样我们在通过修改文件的权限就可以使用数据来代替  u=rwx； g= rwx ；o=rwx；</p>
<h2 id="权限修改-chmod-777-xxx">权限修改 chmod 777 xxx</h2>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204261956465.png" alt="image-20220426195643402"></p>
<hr>
<h1 id="linux上常用网络操作">Linux上常用网络操作</h1>
<h2 id="1主机名配置-hostname">1、主机名配置 hostname</h2>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204262004461.png" alt="image-20220426200421425"></p>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204262008940.png" alt="image-20220426200806818"></p>
<h2 id="2ip地址--ifconfig">2、ip地址  ifconfig</h2>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204262010247.png" alt="image-20220426201026187"></p>
<h2 id="3域名映射">3、域名映射</h2>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204262028613.png" alt="image-20220426202805562"></p>
<p>在进入/etc/hosts（域名解析文件）文件后：</p>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204262028972.png" alt="image-20220426202859917"></p>
<p>通过ping 进行查看：</p>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204262029867.png" alt="image-20220426202937715"></p>
<h2 id="4网络服务器管理">4、网络服务器管理</h2>
<p><img src="https://qinfeng-typora-img.oss-cn-chengdu.aliyuncs.com/img/202204262030805.png" alt="image-20220426203040747"></p>

        
        
    </body>
    </html>